Conversation
…dex, added rabl gem and added forgery protection to controllers
…gery check in order for postman to work
…ts for overdue items and available_inventory
…method names checkin checkout
Video StoreWhat We're Looking For
|
| movie = movies(:movieone) | ||
| starting_inventory = movie.available_inventory | ||
|
|
||
| expect { |
There was a problem hiding this comment.
This test is failing because this customer has overdue items and so is forbidden from checking out a movie.
There was a problem hiding this comment.
Fixed! The Date.tomorrow for customer one in the yml file fixed everything.
| end | ||
|
|
||
| it "returns false if customer has no overdue items" do | ||
| expect(customer.overdue_items?).must_equal false |
There was a problem hiding this comment.
This test is failing, because this customer has an item which was due yesterday. If you want to fix this, I would use erb tags to set the due date to Date.tomorrow, so it would never be overdue.
There was a problem hiding this comment.
Ah! Totally forgot about these dates. Fixed!
|
|
||
| body = JSON.parse(response.body) | ||
| expect(body).must_be_kind_of Array | ||
| expect(body.length).must_equal 1 |
There was a problem hiding this comment.
This test is failing, because this customer has two overdue movies.
| @customers = sort_and_paginate(sort_options, list, params) | ||
| end | ||
|
|
||
| def zomg |
| @@ -0,0 +1,92 @@ | |||
| class ApplicationController < ActionController::API | |||
|
|
|||
There was a problem hiding this comment.
I like the helper methods you put in here.
Video Store API
Congratulations! You're submitting your assignment!
If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.
Comprehension Questions
POST /rentals/check-inendpoint? What does the time complexity depend on? Explain your reasoning.